<?php 
$this->breadcrumbs()->addPage('Consulta', 'consultar');
$this->breadcrumbs()->addPage('Anexos', 'consultar', 'anexos');
$this->breadcrumbs()->addPage('Resultados', 'consultar', 'anexo-resultados');
echo $this->breadcrumbs()->render(); 

echo $this->pagenav()->openList(); 
echo $this->pagenav()->defaultHelperLinks();
echo $this->pagenav()->closeList();
?>
<div id="article">
	<table class="grid">
		<thead>
			<tr>
				<th>Nome</th>
				<th>Número</th>
				<th>Detalhes</th>
			</tr>
		</thead>
		<tfoot>
			<tr>
				<td colspan="3"><?php echo $this->partial('pagination.phtml', array('paginator' => $this->paginator)) ?></td>
			</tr>
		</tfoot>
		<tbody>
			<?php $i = 0 ?>
			<?php foreach ($this->paginator as $p): ?>
			<tr class="<?php echo (++$i % 2) ? 'even' : 'odd' ?>">
				<td><?php echo $p->nome ?></td>
				<td><?php echo $p->processo->numero ?></td>
				<td>
					<a href="<?php echo $this->url(array('action' => 'detalhes', 'controller' => 'processo', 'id' => $p->processo->id)) ?>">
						Detalhes
					</a>
				</td>
			</tr>
			<?php endforeach ?>
		</tbody>
	</table>
</div>